﻿using Himp.Platform;
using MongoDB.Driver;
using System.Collections.Generic;
using Volo.Abp.Data;
using Volo.Abp.MongoDB;

namespace Himp.DataHub.MongoDB;

[ConnectionStringName(DataHubDbProperties.ConnectionStringName)]
public class DataHubMongoDbContext : AbpMongoDbContext, IDataHubMongoDbContext
{
    #region 患者

    public IMongoCollection<PatnMasterIdx> PatnMasterIdxs => Collection<PatnMasterIdx>();

    public IMongoCollection<PatnBaseInfo> PatnBaseInfo { get; set; }

    #endregion

    #region 疾病诊断

    public IMongoCollection<DiseDiagDict> DiseDiagDicts => Collection<DiseDiagDict>();

    public IMongoCollection<ClncDiagDict> ClncDiagDicts => Collection<ClncDiagDict>();

    #endregion

    #region 科室

    public IMongoCollection<DeptInfo> DeptInfo => Collection<DeptInfo>();
    public IMongoCollection<DeptConsultRm> DeptOperRms => Collection<DeptConsultRm>();
    //public IMongoCollection<DeptAttr> DeptAssocAttrs => Collection<DeptAttr>();
    //public IMongoCollection<DeptConsultRm> DeptConsultRms => Collection<DeptConsultRm>();
    //public IMongoCollection<DeptWard> DeptWards => Collection<DeptWard>();

    #endregion

    #region 人员

    public IMongoCollection<PsnInfo> PsnInfo => Collection<PsnInfo>();

    public IMongoCollection<PosInfo> PosInfo => Collection<PosInfo>();

    #endregion

    #region 公共项目

    public IMongoCollection<PubItem> PubItems => Collection<PubItem>();

    #endregion

    #region 药品

    /// <summary>
    /// 
    /// </summary>
    public IMongoCollection<DrugCatalog> DrugCatalogs => Collection<DrugCatalog>();

    /// <summary>
    /// 
    /// </summary>
    public IMongoCollection<DrugCatalogExt> DrugCatalogExts => Collection<DrugCatalogExt>();

    /// <summary>
    /// 
    /// </summary>
    public IMongoCollection<DrugPrdr> DrugPrdrs => Collection<DrugPrdr>();

    /// <summary>
    /// 
    /// </summary>
    public IMongoCollection<DrugMedcWayGrp> DrugMedcWayGrps => Collection<DrugMedcWayGrp>();

    /// <summary>
    /// 
    /// </summary>
    public IMongoCollection<DrugCatalogType> DrugCatalogTypes => Collection<DrugCatalogType>();

    #endregion

    #region 物料

    public IMongoCollection<MatlsBasicInfo> MatlsBasicInfos => Collection<MatlsBasicInfo>();

    #endregion

    protected override void CreateModel(IMongoModelBuilder modelBuilder)
    {
        base.CreateModel(modelBuilder);

        modelBuilder.ConfigureDataHub();
    }
}
